#include <stdio.h>

#define TOTAL (10 + 26*2)

int main(int argc, char **argv)
{
	int  i, resLess = 0, resMore = 0, mark = 1;
	char c;
	int  Supply[TOTAL] = {0};
	int  Want[TOTAL] = {0};
	
	while((c = getchar()) != '\n')
	{
		if(c >= '0' && c <='9')
		{
			Supply[c-'0']++;
		}
		else if(c >= 'a' && c <= 'z')
		{
			Supply[10+c-'a']++;
		}
		else
		{
			Supply[10+26+c-'A']++;
		}
	}
	while((c = getchar()) != '\n')
	{
		if(c >= '0' && c <='9')
		{
			Want[c-'0']++;
		}
		else if(c >= 'a' && c <= 'z')
		{
			Want[10+c-'a']++;
		}
		else
		{
			Want[10+26+c-'A']++;
		}
	}

	for(i = 0; i < TOTAL; i++)
	{
		if( Supply[i] >= Want[i] )
		{
			resMore += (Supply[i] - Want[i]);
		}
		else
		{
			mark = 0;
			resLess += (Want[i] - Supply[i]);
		}
	}
	if(mark)
		printf("Yes %d", resMore);
	else
		printf("No %d", resLess);
	return 0;
}